-- Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
--
-- this file licensed under the Mulan PSL v2.
-- You can use this software according to the terms and conditions of the Mulan PSL v2.
-- You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2
--
-- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
-- PURPOSE.
-- See the Mulan PSL v2 for more details.
--
-- Author: auto generate
-- Create: 2025-8-19
-- Description: DO NOT EDIT; Code generated by "message.lua.mako"
local validate = require 'mc.validate'
local utils = require 'mc.utils'

local MMyMDSModel = {}

---@class MMyMDSModel.SecretNumber
---@field SecretNumber integer
local TSecretNumber = {}
TSecretNumber.__index = TSecretNumber
TSecretNumber.group = {}

local function TSecretNumber_from_obj(obj)
    return setmetatable(obj, TSecretNumber)
end

function TSecretNumber.new(SecretNumber)
    return TSecretNumber_from_obj({SecretNumber = SecretNumber})
end
---@param obj MMyMDSModel.SecretNumber
function TSecretNumber:init_from_obj(obj)
    self.SecretNumber = obj.SecretNumber
end

function TSecretNumber:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TSecretNumber.group)
end

TSecretNumber.from_obj = TSecretNumber_from_obj

TSecretNumber.proto_property = {'SecretNumber'}

TSecretNumber.default = {0}

TSecretNumber.struct = {{name = 'SecretNumber', is_array = false, struct = nil}}

function TSecretNumber:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'SecretNumber', self.SecretNumber, 'uint32', false, errs, need_convert)

    TSecretNumber:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TSecretNumber.proto_property, errs, need_convert)
    return self
end

function TSecretNumber:unpack(_)
    return self.SecretNumber
end

MMyMDSModel.SecretNumber = TSecretNumber

return MMyMDSModel
